package hs4m.kidseducational;

import hs4m.kidseducational.math.MathLevelActivity;
import hs4m.kidseducational.util.Utils;
import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.graphics.Typeface;
import android.view.Menu;
import android.view.ViewGroup;

public class WelcomeActivity extends Activity {
	public Typeface typeFace;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_welcome);
		typeFace = Typeface.createFromAsset(getAssets(), "fonts/VNFREE.TTF");
		final ViewGroup mContainer = (ViewGroup) findViewById(android.R.id.content).getRootView();
		Utils.setAppFont(mContainer, typeFace);
		new Thread(new Runnable() {
			
			@Override
			public void run() {
				try {
					Thread.sleep(3000);
					Intent intent = new Intent(getApplicationContext(), HomepageActivity.class);
					startActivity(intent);
					finish();
				} catch (InterruptedException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
			}
		}).start();
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.activity_welcome, menu);
		return true;
	}

}
